% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/table_round.R
\name{table_round}
\alias{table_round}
\title{Round numbers in a table, each column to appropriate number of decimal places}
\usage{
table_round(x, var = names(x), varnametype = "rname", ...)
}
\arguments{
\item{x}{data.frame, data.table, or vector with at least some numerical columns, like the results
of ejamit()$results_bysite}

\item{var}{optional, but assumed to be names(x) by default, specifies colnames of table
or names of vector elements, within x}

\item{varnametype}{optional, name of column in map_headernames that is looked in for var}

\item{...}{passed to \code{\link[=is.numericish]{is.numericish()}}}
}
\value{
Returns the original x but with appropriate cells rounded off.
}
\description{
Round numbers in a table, each column to appropriate number of decimal places
}
\details{
Percentages stored as 0 to 1 rather than 0 to 100 will not be shown correctly unless adjusted,
because rounding info says 0 digits when the intent is to show 0 digits after the 0-100 percent number.
}
\examples{
 
  table_round(c(12.123456, 9, NA ), 'pm')

 x <- testoutput_ejamit_10pts_1miles$results_bysite[
   1:2, c('lat','lon', 'pop', names_these, names_these_ratio_to_avg, names_e_pctile), 
   with = FALSE
 ]

 table_rounding_info(names(x))

 table_round(x)

}
\seealso{
\code{\link[=is.numericish]{is.numericish()}} \code{\link[=table_rounding_info]{table_rounding_info()}}
}
\keyword{internal}
